package com.koron.plan.web.patrolplan.bean.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.koron.plan.web.common.DeleteFlag;
import com.koron.plan.web.common.Sortable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("巡视计划-巡视人员")
public class PatrolPlanWorkerBean implements Serializable, Sortable, DeleteFlag {

    private static final long serialVersionUID = 326493220908701585L;

    @ApiModelProperty("32位随机数，主键")
    private String id;

    @ApiModelProperty("巡视计划主键 w_plan_patrol.id")
    private String planId;

    @ApiModelProperty("巡视人员id")
    @NotEmpty(message = "巡视人员账号不能为空")
    private String workerId;

    @ApiModelProperty("巡视人员名字")
    @NotEmpty(message = "巡视人员名字不能为空")
    private String workerName;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @JsonIgnore
    @ApiModelProperty("删除标志 0：未删除 1：已删除")
    private Boolean deleteFlag;

}
